<template>
	<view class="drama-list">
		<view class="title">
			<text>选集</text>
		</view>
		<view class="list">
			<view v-for="(dramaData,index) in dramaListData" :key="index" :class="['btn',currentDramaData.name==dramaData.name&&currentDramaData.url==dramaData.url?'warn':'']"
			 v-text="dramaData.name" @click="select(dramaData)"></view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		props: ['dramaListData', 'currentDramaData'],
		methods: {
			select(currentDramaData) {
				this.$emit('select', currentDramaData)
			}
		}
	}
</script>

<style scoped>
	.drama-list { padding-bottom: 25rpx;}

	.drama-list .title {
		font-weight: 600;
		padding: 10rpx 0;
		font-size: 30rpx;
		padding: 25rpx;
	}

	.drama-list .list {
		display: flex;
		flex-wrap: wrap;
		padding-left: 25rpx;
		padding-right: 25rpx;
	}

	.drama-list .list .btn {
		width: calc(calc(100% / 4) - 22rpx);
		margin: 10rpx;
		height: 50rpx;
		line-height: 50rpx;
		text-align: center;
		border: 1px solid #F1F1F1;
		border-radius: 8rpx;
		font-size: 26rpx;

	}

	.drama-list .list .btn.warn {
		color: #FFFFFF;
		background-color: #d81e06;
		border: 1px solid #d81e06;
	}
</style>
